package shuai.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.jdbc.core.namedparam.NamedParameterJdbcDaoSupport;

public class UserNamedSupportDao extends NamedParameterJdbcDaoSupport implements UserDao {

	public List<User> search() {
		
		return null;
	}

	public List<User> search(User user) {
		
		return null;
	}

	public User findById(int Userno) {
		
		return null;
	}

	public void save(User user) {
		String sql="insert into t_user(username,password,age) values(:name,:pass,:age)";
		Map map=new HashMap();
		map.put("name", user.getUsername());
		map.put("pass", user.getPassword());
		map.put("age", user.getAge());
		getNamedParameterJdbcTemplate().update(sql, map);

	}

	public void update(User user) {
		

	}

	public void delete(int userno) {
		

	}

}
